<?php
namespace app\admin\controller;

use think\Db;
use think\Controller;
/*
公共页面
*/
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2021 http://115cms.com.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 作者@梦雨 <50361804@qq.com>
// +----------------------------------------------------------------------
class Common extends Controller
{
    public function _initialize()
    {
        hook('phpadmincommon');
        if (!session('userid')) {
            $this->error('请登录', url('admin/login/index'));
        }
        if (user('admin')==0) {
            $this->error('无权限', url('index/index/index'));
        }
    }
}